github.com/klauspost/compress/zstd.Decoder.current (field)

109 uses

	github.com/klauspost/compress/zstd (current package)
		decoder.go#L29: 	current decoderState
		decoder.go#L94: 	d.current.crc = xxhash.New()
		decoder.go#L95: 	d.current.flushed = true
		decoder.go#L98: 		d.current.err = ErrDecoderNilInput
		decoder.go#L126: 		if len(d.current.b) > 0 {
		decoder.go#L127: 			filled := copy(p, d.current.b)
		decoder.go#L129: 			d.current.b = d.current.b[filled:]
		decoder.go#L135: 		if len(d.current.b) == 0 {
		decoder.go#L137: 			if d.current.err != nil {
		decoder.go#L141: 				return n, d.current.err
		decoder.go#L145: 	if len(d.current.b) > 0 {
		decoder.go#L147: 			println("returning", n, "still bytes left:", len(d.current.b))
		decoder.go#L152: 	if d.current.err != nil {
		decoder.go#L156: 		println("returning", n, d.current.err, len(d.decoders))
		decoder.go#L158: 	return n, d.current.err
		decoder.go#L167: 	if d.current.err == ErrDecoderClosed {
		decoder.go#L168: 		return d.current.err
		decoder.go#L175: 		d.current.err = ErrDecoderNilInput
		decoder.go#L176: 		if len(d.current.b) > 0 {
		decoder.go#L177: 			d.current.b = d.current.b[:0]
		decoder.go#L179: 		d.current.flushed = true
		decoder.go#L201: 		d.current.b = dst
		decoder.go#L202: 		d.current.err = err
		decoder.go#L203: 		d.current.flushed = true
		decoder.go#L211: 	d.current.decodeOutput = decodeOutput{}
		decoder.go#L212: 	d.current.err = nil
		decoder.go#L213: 	d.current.flushed = false
		decoder.go#L214: 	d.current.d = nil
		decoder.go#L227: 	d.current.output = make(chan decodeOutput, d.o.concurrent)
		decoder.go#L229: 	d.current.cancel = cancel
		decoder.go#L231: 	go d.startStreamDecoder(ctx, r, d.current.output)
		decoder.go#L253: 	if d.current.cancel != nil {
		decoder.go#L257: 		d.current.cancel()
		decoder.go#L258: 		d.current.cancel = nil
		decoder.go#L260: 	if d.current.d != nil {
		decoder.go#L262: 			printf("re-adding current decoder %p, decoders: %d", d.current.d, len(d.decoders))
		decoder.go#L264: 		d.decoders <- d.current.d
		decoder.go#L265: 		d.current.d = nil
		decoder.go#L266: 		d.current.b = nil
		decoder.go#L268: 	if d.current.output == nil || d.current.flushed {
		decoder.go#L272: 	for v := range d.current.output {
		decoder.go#L280: 	d.current.output = nil
		decoder.go#L281: 	d.current.flushed = true
		decoder.go#L290: 		if len(d.current.b) > 0 {
		decoder.go#L291: 			n2, err2 := w.Write(d.current.b)
		decoder.go#L293: 			if err2 != nil && (d.current.err == nil || d.current.err == io.EOF) {
		decoder.go#L294: 				d.current.err = err2
		decoder.go#L295: 			} else if n2 != len(d.current.b) {
		decoder.go#L296: 				d.current.err = io.ErrShortWrite
		decoder.go#L299: 		if d.current.err != nil {
		decoder.go#L304: 	err := d.current.err
		decoder.go#L418: 	if d.current.err != nil {
		decoder.go#L422: 	d.current.b = d.current.b[:0]
		decoder.go#L439: 		d.current.decodeOutput, ok = <-d.current.output
		decoder.go#L442: 		case d.current.decodeOutput, ok = <-d.current.output:
		decoder.go#L449: 		d.current.err = io.ErrUnexpectedEOF
		decoder.go#L452: 	next := d.current.decodeOutput
		decoder.go#L454: 		d.current.crc.Reset()
		decoder.go#L459: 		println("got", len(d.current.b), "bytes, error:", d.current.err, "data crc:", tmp)
		decoder.go#L467: 		d.current.crc.Write(next.b)
		decoder.go#L470: 		got := uint32(d.current.crc.Sum64())
		decoder.go#L475: 			d.current.err = ErrCRCMismatch
		decoder.go#L487: 	if d.current.d == nil {
		decoder.go#L488: 		d.current.d = <-d.decoders
		decoder.go#L490: 	for len(d.current.b) == 0 {
		decoder.go#L493: 			d.current.err = d.frame.reset(&d.syncStream.br)
		decoder.go#L494: 			if d.current.err == nil {
		decoder.go#L495: 				d.current.err = d.setDict(d.frame)
		decoder.go#L497: 			if d.current.err != nil {
		decoder.go#L501: 				d.current.err = ErrDecoderSizeExceeded
		decoder.go#L508: 		d.current.err = d.frame.next(d.current.d)
		decoder.go#L509: 		if d.current.err != nil {
		decoder.go#L517: 		d.current.err = d.current.d.decodeBuf(&d.frame.history)
		decoder.go#L519: 		if d.current.err != nil {
		decoder.go#L520: 			println("error after:", d.current.err)
		decoder.go#L523: 		d.current.b = d.frame.history.b[histBefore:]
		decoder.go#L529: 		d.syncStream.decodedFrame += uint64(len(d.current.b))
		decoder.go#L534: 			d.current.err = ErrFrameSizeExceeded
		decoder.go#L539: 		if d.current.d.Last && d.frame.FrameContentSize != fcsUnknown && d.syncStream.decodedFrame != d.frame.FrameContentSize {
		decoder.go#L543: 			d.current.err = ErrFrameSizeMismatch
		decoder.go#L550: 				d.frame.crc.Write(d.current.b)
		decoder.go#L552: 			if d.current.d.Last {
		decoder.go#L554: 					d.current.err = d.frame.checkCRC()
		decoder.go#L556: 					d.current.err = d.frame.consumeCRC()
		decoder.go#L558: 				if d.current.err != nil {
		decoder.go#L559: 					println("CRC error:", d.current.err)
		decoder.go#L564: 		d.syncStream.inFrame = !d.current.d.Last
		decoder.go#L570: 	if d.current.d != nil {
		decoder.go#L572: 			printf("re-adding current decoder %p", d.current.d)
		decoder.go#L574: 		d.decoders <- d.current.d
		decoder.go#L575: 		d.current.d = nil
		decoder.go#L582: 	if d.current.err == ErrDecoderClosed {
		decoder.go#L586: 	if d.current.cancel != nil {
		decoder.go#L587: 		d.current.cancel()
		decoder.go#L589: 		d.current.cancel = nil
		decoder.go#L598: 	if d.current.d != nil {
		decoder.go#L599: 		d.current.d.Close()
		decoder.go#L600: 		d.current.d = nil
		decoder.go#L602: 	d.current.err = ErrDecoderClosed